<?xml version="1.0" encoding="UTF-8" ?>
<!-- Example:
<hdd>
  <id>1</id>   
  <name>hdd_1</name>
  <price>1000</price>
  <manName>DELL</manName> 
  <count>23</count>
</hdd>
-->
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
  <xsl:output method="html"/>
  <xsl:template match="/">
    <html>
    <head><title>ComputerShop::Computer Component Details</title></head>
    <body>
    <h2>Computer Component Details</h2>
      <xsl:apply-templates />
    </body>
    </html>
  </xsl:template>
  
  <xsl:template match="hdd|motherboard|processor|ram|videocard">
    <table border="0" bgcolor="CornflowerBlue">
      <tr>
        <td valign="top" align="left">ID</td>
        <td bgcolor = "white">
          <xsl:value-of select="id"/>
        </td>
      </tr>
      <tr>
        <td valign="top" align="left">Name  </td>
        <td bgcolor = "white">
            <xsl:value-of select="name"/>
        </td>
      </tr>
      <tr>
        <td valign="top" align="left">Price  </td>
        <td bgcolor = "white">
            <xsl:value-of select="price"/>
        </td>
      </tr>
      <tr>
        <td valign="top" align="left">Manufacturer Name  </td>
        <td bgcolor = "white"><xsl:value-of select="manName" /></td>
      </tr>
      <tr>
        <td valign="top" align="left">Count  </td>
        <td bgcolor = "white"><xsl:value-of select="count" /></td>
      </tr>
   </table>
    
   <br/><br/>
  <!-- Return back to the list of components -->
  <xsl:element name="a"> <!-- A link in XSLT -->
    <xsl:attribute name="href"><xsl:text>shop</xsl:text></xsl:attribute>
    <xsl:text>Back</xsl:text>
  </xsl:element>
  
  </xsl:template>

</xsl:stylesheet>
